package org.wangchaocheng.cloudgallery.user.converter;

import java.util.List;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import org.wangchaocheng.cloudgallery.common.converter.BaseConverter;
import org.wangchaocheng.cloudgallery.dto.user.UserDTO;
import org.wangchaocheng.cloudgallery.user.dataObject.UserDO;

/**
 * @author wangchaocheng
 * @date 2025-03-02
 **/
@Mapper
public interface UserConverter extends BaseConverter<UserDO, UserDTO> {

    UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);

    @Override
    @Mapping(target = "deleted", ignore = true)
    UserDO dto2Do(UserDTO dataTransferObject);

    @Override
    List<UserDO> dtoList2DoList(List<UserDTO> dataTransferObjectList);

    @Override
    UserDTO do2Dto(UserDO dataObject);

    @Override
    List<UserDTO> doList2DtoList(List<UserDO> dataObjectList);
}
